<?php
/*
 *  @author Nicolas Genevaux
 * (c)nige 2008
 */
	include_once($RACINE.'inc/var.points.php');
	$INSCRIT_CREER = 'CREATE TABLE `school`.`inscrit` (`identifiant` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `login` VARCHAR(256) NOT NULL, `motdepasse` VARCHAR(256) NOT NULL, `adresseip` VARCHAR(256) NOT NULL, `derniereconnexion` DATETIME NOT NULL, `inscription` DATETIME NOT NULL) ENGINE = MyISAM';
	$INSCRIT_COMPTE_LOGIN = 'SELECT COUNT(*) as total FROM inscrit WHERE login=$0';
	$INSCRIT_RECORD = 'INSERT INTO inscrit (login,motdepasse,adresseip,derniereconnexion,inscription,points) VALUES ($0,$1,$2,$3,$4,'.$INSCRITPTS.')';
	$INSCRIT_SELECT = 'SELECT * FROM inscrit WHERE identifiant=$0';
	$INSCRIT_SELECT_ID = 'SELECT identifiant FROM inscrit WHERE login=$0 AND motdepasse=$1';
	$INSCRIT_UPDATE_CONNEXION = 'UPDATE inscrit SET derniereconnexion=NOW() WHERE identifiant=$0';
	$INSCRIT_UPDATE = 'UPDATE inscrit SET login=$1,motdepasse=$2 WHERE identifiant=$0';
	$INSCRIT_SELECT_IP = 'SELECT identifiant FROM inscrit WHERE adresseip=$0 AND login=\'\'';
	$INSCRIT_POINTS = 'UPDATE inscrit SET points=points+$1 WHERE identifiant=$0';
?>
